from typing import List, Optional
from pydantic  import BaseModel, Field


class ApiRequest(BaseModel):
    """Information about a person."""

    name: Optional[str] = Field(
        default=None, description="the request method of the api."
    )
    url: Optional[str] = Field(
        default=None, description="the url address for api request, url must start with https."
    )
    method: Optional[str] = Field(
        default=None, description="the request method of the api, the value is `GET` or `POST`."
    )
    parameters: Optional[dict] = Field(
        default=None, description="the request parameters of the api, contains query parameters or body parameters."
    )
